﻿@model IEnumerable<kmaraszkiewicz.Models.Photo>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create", new { id = ViewBag.ProjectId }, null)
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Directory)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            <img
                src="@Url.Content(item.Directory)"
                title="@Url.Content(item.Directory)"
                style="height: 50px"
                />
        </td>
        <td>
            @Html.ActionLink("Delete", "Delete", new { id=item.PhotoId })
        </td>
    </tr>
}

</table>
